<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>编辑</title>
		<link rel="stylesheet" type="text/css" href="../../plugins/layui/css/layui.css" />
		<link href="../../kitAdmin/css/app.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" type="text/css" href="../../plugins/select2/dist/css/select2.min.css" />
		<style type="text/css">
			.slcstyle {
				width: 190px !important;
				height: 38px !important;
			}
		</style>
	</head>

	<body>
		<div class='kit-table'>
			<div style='margin:10px'>

				<form class='layui-form' action='' lay-filter='form-edit'>
					<input type='hidden' name='uniqueid' data-link='{:uniqueid}' />
					<div class='layui-form-item'>
						<label class='layui-form-label'>外教名称</label>
						<div class='layui-input-inline'>
							<input type='text' placeholder='' data-link='{:name}' id='_name' name='name' class='layui-input'>
						</div>

					</div>
					<div class='layui-form-item'>
						<div class='layui-inline'>
							<label class='layui-form-label'>登录账号</label>
							<div class='layui-input-inline'>
								<input type='text' placeholder='' data-link='{:account}' id='_account' name='account' class='layui-input'>
							</div>
						</div>
					</div>
					<div class='layui-form-item'>
						<div class='layui-inline'>
							<label class='layui-form-label'>从属</label>
							<div class='layui-input-inline'>
								<select placeholder='' data-link='{:depence}' id='_depence' name='depence' class='layui-input'>
									<option value="独立">自由外教</option>
									<option value="Tracey">Tracey</option>
								</select>
							</div>
						</div>
					</div>
					<div class='layui-form-item'>
						<div class='layui-inline'>
							<label class='layui-form-label'>Zoom Id</label>
							<div class='layui-input-inline'>
								<input type='text' placeholder='' data-link='{:zoomid}' id='_zoomid' name='zoomid' class='layui-input'>
							</div>
						</div>
					</div>
					<div class='layui-form-item'>
						<div class='layui-inline'>
							<label class='layui-form-label'>邮箱</label>
							<div class='layui-input-inline'>
								<input type='text' placeholder='' data-link='{:email}' id='_email' name='email' class='layui-input'>
							</div>
						</div>
					</div>
					<div class='layui-form-item'>
						<div class='layui-inline'>
							<label class='layui-form-label'>国籍</label>
							<div class='layui-input-inline'>
								<input type='text' placeholder='' data-link='{:nationality}' id='_nationality' name='nationality' class='layui-input'>
							</div>
						</div>
					</div>
					<div class='layui-form-item'>
						<div class='layui-inline'>
							<label class='layui-form-label'>状态</label>
							<div class='layui-input-inline'>
								<select placeholder='' data-link='{:status}' id="_status" name ="status" class='layui-input'>
									<option value="在职">在职</option>
									<option value="离职">离职</option>
								</select>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
		<script src="../../common/js/jquery.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/js/base.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../plugins/jsviews/jsviews.js" type="text/javascript"></script>
		<script src="../../plugins/select2/dist/js/select2.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../plugins/layui/layui.js"></script>
		<script type="text/javascript">
			var uid = getQueryVariable('uniqueid');
			jQuery(document).ready(function() {
				bindFormData();
			});
			var callback_save = function() {
				return $('.layui-form').serialize();
			}
			
			function bindFormData() {
				var form;
				layui.use(['form', 'laydate'], function() {
					form = layui.form;
					//监听提交
					form.on('submit(formDemo)', function(data) {
						layer.msg(JSON.stringify(data.field));
						return false;
					});
				});
				if(uid) {
					$.ajax({
						url: baseUrl + '/teachers/' + uid,
						type: 'get',
						success: function(data) {
							$.link(true, ".kit-table", data.data);
//							$('select').select2().change();
							form.rebder();
						},
						error: function() {
							parent.layer.alert('系统或网络错误！');
						}
					});
				}
			}
		</script>
	</body>

</html>